import axios from 'axios'
axios.defaults.withCredentials = true

// axios.defaults.timeout = 5000
// axios.defaults.baseURL = '/api/'

let url
let switchApi = false
if (switchApi) {
  url = 'http://172.30.200.7:8081/auth'
} else {
  url = '/'
}

let sever = axios.create({
  baseURL: url,
  timeout: 50000,
  withCredentials: true,
  headers: { 'Content-Type': 'application/json charset=utf-8' }
})

export default sever
